package javase.ch03.homeWork.Test1;



public class DepositThread implements Runnable {
    private Account account;
    public DepositThread(Account account) {
        this.account = account;
    }

    @Override
    public void run() {
        for (int i = 0; i < 3; i++) {
            account.deposit(Thread.currentThread().getName(), 10000);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
